package tech.waterism.document;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.*;
import tech.waterism.dto.PrincipleRecord;
import tech.waterism.enums.RuleTypeEnum;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 自定义调度规则配置表(DPrincipleCustom)实体类
 *
 * @author zhe.xiong
 * @since 2022-05-30 17:18:42
 */
@Data
//@Document(value = "d_principle_custom")
@ApiModel(value = "自定义调度规则配置表")
public class DPrincipleCustomDocument {
    @Id
    @ApiModelProperty("由MongoDB自动生成主键ObjectId")
    private String objectId;
    /**
     * 预报站号
     */
    @ApiModelProperty(value = "预报站号")
    private String stcd;
    /**
     * 枢纽编码
     */
    @ApiModelProperty(value = "枢纽编码")
    private String hbcd;
    /**
     * 规则名称
     */
//    @NotEmpty
    @ApiModelProperty("规则名称")
    private String name;

    /**
     * 规则类型
     */
    private RuleTypeEnum type;

    /**
     * 规则记录
     */
    @ApiModelProperty(value = "规则记录")
    private List<PrincipleRecord> records;

    @CreatedBy
    @ApiModelProperty("创建者")
    private String createdBy;

    @CreatedDate
    @ApiModelProperty("创建时间")
    private LocalDateTime createdDate;

    @LastModifiedBy
    @ApiModelProperty("更新者")
    private String lastModifiedBy;

    @LastModifiedDate
    @ApiModelProperty("更新时间")
    private LocalDateTime lastModifiedDate;
}

